import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class Player {

	private String nom;
	private int score;
	private List<RPSEnum> mvmt;
	private Iterator<RPSEnum> itr;
	
	public Player(String nom, List<RPSEnum> mvmt) {
		this.nom = nom;
		score = 0;
		this.mvmt = mvmt;
		itr = this.mvmt.iterator();
	}
	
	public Player(String nom) {
		this.nom = nom;
		score = 0;
		mvmt = aleaFill(10);
		itr = mvmt.iterator();
	}
	
	public static ArrayList<RPSEnum> aleaFill (int num){
		
		ArrayList<RPSEnum> m = new ArrayList<RPSEnum>();
		
		for(int i = 0; i < num; i++){
			m.add(RPSEnum.getRandom());
		}
		
		return m;
	}
	
	public String getnom(){
		return nom;
	}
	
	public int getScore(){
		return score;
	}
	
	public int getNbrMvmt(){
		return mvmt.size();
	}
	
	public RPSEnum getNextMove(){
		return itr.next();
	}
	
	public Boolean hasNextMove(){
		return itr.hasNext();
	}
	
	public void setScore(int s){
		score = s;
	}
	
}
